﻿using Modules.Attachment;
using Modules.Constructor;
using Modules.Corp;
using System.ComponentModel.DataAnnotations;
using System.Xml.Linq;

namespace ManagementApi.Models.Account
{
    /// <summary>
    /// 施工总包、劳务分包、专业分包、监理企业信息表 编辑模型
    ///</summary>
    [Serializable]
    public class CorpCreateForm
    {
        /// <summary>
        /// 企业Id
        /// </summary>
        public int? CorpId { get; set; }

        /// <summary>
        /// 企业名称
        ///</summary>
        [Display(Name = "企业名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 企业分类
        ///</summary>
        [Display(Name = "企业分类")]
        [Required(ErrorMessage = "{0}不能为空")]
        public 企业分类 CorpType { get; set; }

        /// <summary>
        /// 企业单位类型
        ///</summary>
        [Display(Name = "企业单位类型")]
        [Required(ErrorMessage = "{0}不能为空")]
        public ConstructorType Type { get; set; }

        /// <summary>
        /// 企业信用代码
        ///</summary>
        [Display(Name = "企业信用代码")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 登陆密码
        ///</summary>
        [Display(Name = "登陆密码")]
        public string? Password { get; set; }

        /// <summary>
        /// 归属省
        ///</summary>
        [Display(Name = "归属省")]
        [Required(ErrorMessage = "{0}不能为空")]
        public int? ProvinceCode { get; set; }

        /// <summary>
        /// 归属地市
        ///</summary>
        [Display(Name = "归属地市")]
        [Required(ErrorMessage = "{0}不能为空")]
        public int? CityCode { get; set; }

        /// <summary>
        /// 归属区县
        ///</summary>
        [Display(Name = "归属区县")]
        [Required(ErrorMessage = "{0}不能为空")]
        public int? AreaCode { get; set; }

        /// <summary>
        /// 注册地址
        ///</summary>
        [Display(Name = "注册地址")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string RegAddr { get; set; }

        /// <summary>
        /// 办公地址
        ///</summary>
        [Display(Name = "办公地址")]
        public string OfficeAddr { get; set; }

        /// <summary>
        /// 法人姓名
        ///</summary>
        [Display(Name = "法人姓名")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Legalman { get; set; }

        /// <summary>
        /// 法人身份证号码
        ///</summary>
        [Display(Name = "法人身份证号码")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string LegalCardno { get; set; }

        /// <summary>
        /// 法人手机号码
        ///</summary>
        [Display(Name = "法人手机号码")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string LegalMobile { get; set; }

        /// <summary>
        /// 法人职务
        ///</summary>
        [Display(Name = "法人职务")]
        public string LegalDuty { get; set; }

        /// <summary>
        /// 法人职称
        ///</summary>
        [Display(Name = "法人职称")]
        public string LegalTitle { get; set; }

        /// <summary>
        /// 经济类型
        ///</summary>
        [Display(Name = "经济类型")]
        [Required(ErrorMessage = "{0}不能为空")]
        public CorpEconomicType? EconomicType { get; set; }

        /// <summary>
        /// 邮编
        ///</summary>
        [Display(Name = "邮编")]
        public string? ZipCode { get; set; }

        /// <summary>
        /// 注册资本
        ///</summary>
        [Display(Name = "注册资本")]
        public decimal? RegCapital { get; set; }

        /// <summary>
        /// 企业注册日期
        ///</summary>
        [Display(Name = "企业注册日期")]
        [Required(ErrorMessage = "{0}不能为空")]
        public DateTime? RegisterDate { get; set; }

        /// <summary>
        /// 联系人
        ///</summary>
        [Display(Name = "联系人")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string LinkMan { get; set; }

        /// <summary>
        /// 联系人电话
        ///</summary>
        [Display(Name = "联系人电话")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string LinkTel { get; set; }

        /// <summary>
        /// 验证码
        /// </summary>
        [Display(Name = "验证码")]
        public string? VerificationCode { get; set; }

        /// <summary>
        /// 营业执照
        /// </summary>
        [Display(Name = "营业执照")]
        public IEnumerable<AttachmentsForm<int>> Attachments { get; set; }
    }
}